import request from '@/utils/request'

export function login(username, password, type, deviceId, channelId) {
  return request({
    url: '/vueLogin',
    method: 'post',
    headers: { 'X-User-Login': 'login' },
    data: { username, password, type }
  })
}

export function getInfo(token) {
  return request({
    url: '/getUserInfo',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vueLoginOut',
    method: 'get'
  })
}
export function getMenus() {
  return request({
    url: '/getMenus',
    method: 'post'
  })
}
// 域名检测
export function getCheckName() {
  return request({
    url: '/sys/getDomain',
    method: 'post',
    dataType: 'json',
    data: {params: {}}
  })
}
